﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_XuLyHienThiDanhSachPhanLoai.aspx.cs" Inherits="ChucNang_Admin_Admin_XuLyHienThiDanhSachPhanLoai" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%
    int idcha = int.Parse(Request.QueryString["Id_Cha"].ToString());
    DataDSTableAdapters.PHANLOAITableAdapter pladapter = new DataDSTableAdapters.PHANLOAITableAdapter();
    DataDS.PHANLOAIDataTable table = pladapter.PHANLOAI_LayPhanLoaiTheoIDCha(idcha);
    for (int i = 0; i < table.Rows.Count; i++)
    {
        string str = "<div  style='background:white; font-size: 20px;  float:left; clear:both; '>";
        str += "<font font-family: Arial, Helvetica, sans-serif; color='blue'>&nbsp;&nbsp;<input style='width:10px; high:10px; font-size:10px;' type='button' value='+' id=" + table.Rows[i]["Id"] + " onclick=LoadDefault('childof" + table.Rows[i]["Id"] + "'," + table.Rows[i]["Id"] + ") > " + table.Rows[i]["TenPhanLoai"] + "&nbsp;&nbsp;</font>";
        str += "<a style='font-size: 14px;' href ='Admin_ThemPhanLoaiCon.aspx?Id_Cha=" + table.Rows[i]["Id"] + " ' >Thêm con</a> ";
        str += "<a style='font-size: 14px;' href ='Admin_CapNhatPhanLoai.aspx?Id=" + table.Rows[i]["Id"] + " ' >Cập nhật</a> ";
        str += "<a style='font-size: 14px;' href ='Admin_XuLyXoaPhanLoai.aspx?Id=" + table.Rows[i]["Id"] + " ' >Xóa</a><br>";
        str += "<div style='margin-left:20px;' id='childof" + table.Rows[i]["Id"] + "'></div>";
        str += "</div>";
       
        Response.Write(str);
        
    }
    
%>